1) Field of the Invention
The present invention relates to a file management program, a file management process, and a file management apparatus for management of files in a storage device, and in particular to a file management program, a file management process, and a file management apparatus which utilize an extent-based system.
2) Description of the Related Art
The extent-based file management is a technique for increasing the efficiency of a file system. According to the extent-based file management, contiguous logical regions (blocks) are treated as a unit called an extent on a volume, and a plurality of blocks can be accessed as an extent. Therefore, data stored in a plurality of blocks can be efficiently accessed.
In recent years, the extent-based file systems have been becoming mainstream. In many extent-based file systems, a directory file is formed by randomly arranging variable-length records representing directory records on a linear logical block region. That is, records in which names of files under a directory are registered are arranged irrespective of the names of the files. Therefore, the processing for searching for a name leads to a linear search of the entire target directory file.
In addition, in order to suppress occurrence of a linear search of an entire directory file, it is possible to use a name cache. The name cache is realized by caching in a memory directory records which have been looked up, and acquiring one of the cached directory records when access to a file having an identical name to a file which has been looked up is requested. However, since the capacity of the memory which can be mounted in the system is limited, it is impossible to manage all of the directory entries in the system by using the name cache. Therefore, a linear search of the entire target directory file occurs with an ignorable frequency.
In particular, in recent years, the amount of data managed by each file system has significantly increased, and many directories have a great number of files thereunder and are massive. When the size of a directory increases, the hit rate in the name cache decreases, and therefore the probability of occurrence of a search of the entire directory file increases. Thus, in some cases, the overall performance of the file system deteriorates.
It is known that use of the so-called directory index is effective for solving the above problem, where the directory index is an index containing name information and being arranged in a directory file. Conventionally, several techniques for realizing the directory index have been proposed. Four representative examples of such techniques are indicated below.